翻訳と辞書
Words near each other
・ Function problem
・ Function prologue
・ Function prototype
・ Function representation
・ Function series
・ Function space
・ Function test
・ Function tree
・ Function type
・ Function value
・ Function word
・ Function-Behaviour-Structure ontology
・ Function-level programming
・ Function-spacer-lipid construct
・ Functional
Functional (C++)
・ Functional (mathematics)
・ Functional agonist
・ Functional agrobiodiversity
・ Functional airspace block
・ Functional analog
・ Functional analysis
・ Functional analysis (psychology)
・ Functional analytic psychotherapy
・ Functional approach
・ Functional beverage
・ Functional block diagram
・ Functional boxplot
・ Functional branding
・ Functional brief


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

Functional (C++) : ウィキペディア英語版
Functional (C++)

In the context of the C++ programming language, functional refers to a header file that is part of the C++ Standard Library and provides a number of predefined class templates for function objects, including arithmetic operations, comparisons, and logical operations. Instances of these class templates are C++ classes that define a function call operator, and the instances of these classes can be called as if they were functions. It is possible to perform very sophisticated operations without actually writing a new function object, simply by combining predefined function objects and function object adaptors.
The class template std::function provided by C++11 is a general-purpose polymorphic function wrapper. Instances of std::function can store, copy, and invoke any callable target—functions, lambda expressions (expressions defining anonymous functions), bind expressions (instances of function adapters that transform functions to other functions of smaller arity by providing values for some of the arguments), or other function objects.
The algorithms provided by the C++ Standard Library do not require function objects of more than two arguments. Function objects that return Boolean values are an important special case. A unary function whose return type is is called a ''predicate'', and a binary function whose return type is is called a ''binary predicate''.
==Adaptable function objects==
In general, a function object has restrictions on the type of its argument. The type restrictions need not be simple, though: may be overloaded or may be a member template. Similarly, there need be no way for a program to determine what those restrictions are. An adaptable function object, however, does specify what the argument and return types are, and provides nested s so that those types can be named and used in programs. If a type is a model of an adaptable generator, then it must define . Similarly, if is a model of the adaptable unary function, it must define and , and if is a model of the adaptable binary function, it must define , , and . The C++ Standard Library provides base classes and to simplify the definition of adaptable unary functions and adaptable binary functions.
Adaptable function objects are important, because they can be used by function object adaptors: function objects that transform or manipulate other function objects. The C++ Standard Library provides many different function object adaptors, including (that returns the logical complement of the value returned by a particular adaptable predicate), and and , which perform composition of function object.

抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「Functional (C++)」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.